package com.xiaoshuidi.cloud.module.contract.dal.mysql.contract;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.HomeQueryVO;
import com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.ownerContract.ContractHouseOwnerPageReqVO;
import com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.ownerContract.ContractHouseOwnerPageRespVO;
import com.xiaoshuidi.cloud.module.contract.dal.dataobject.contract.ContractHouseOwnerDO;
import com.xiaoshuidi.cloud.module.contract.service.contract.dto.OwnerContractRoomDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * 业主合同 Mapper
 *
 * @author 合房租赁
 */
@Mapper
public interface ContractHouseOwnerMapper extends BaseMapperX<ContractHouseOwnerDO> {

    IPage<ContractHouseOwnerPageRespVO> pageContractHouseOwnerList(Page<ContractHouseOwnerPageRespVO> page , @Param("param") ContractHouseOwnerPageReqVO param);

    List<ContractHouseOwnerPageRespVO> pageContractHouseOwnerList(@Param("param") ContractHouseOwnerPageReqVO param);

    List<ContractHouseOwnerDO> getRenewalOwnerContractList(@Param("roomId") Long roomId, @Param("contractNode")String contractNode, @Param("statusList")List<String> statusList);

    Integer countOverdueOwnerContract(@Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

    IPage<ContractHouseOwnerDO> pageContractOwnerHomeList(Page<ContractHouseOwnerDO> page , @Param("param") HomeQueryVO param);

    void updateMemberUser(@Param("userId") Long userId, @Param("mobile") String mobile,@Param("userName")  String userName,@Param("oldUserId")  Long oldUserId);

    List<OwnerContractRoomDTO> getOwnerContractByRoomIds(@Param("roomIds") List<Long> roomIds);

}
